﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tools
{
    public class Vector
    {
        //x点
        private double x;
        //y点
        private double y;
        //z点
        private double z;

        
        // 向量的模计算   二维向量
        public static double Norm(double x, double y)
        {
            return System.Math.Sqrt(x * x + y * y);
        }

        
        // 向量的模计算    三维向量
        public static double Norm(double x, double y, double z)
        {
            return System.Math.Sqrt(x * x + y * y + z * z);
        }

        public Vector()
        {

        }
        public Vector(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }

        public Vector(double x, double y, double z)
        {
            this.X = x;
            this.Y = y;
            this.Z = z;
        }

        public double X { get => x; set => x = value; }
        public double Y { get => y; set => y = value; }
        public double Z { get => z; set => z = value; }
    }
}
